<template>
	<view class="content fowe600">
		<view class="hei20"></view>
		<view v-if="list.writeoff_state == 0 && list.revoke_state == 0" class="wid90 mar bacFFF borRad20" style="padding: 40rpx 0;">
			<view class="textCen foSi40">请将二维码出示给核销员</view>
			<view class="dis disJuC mar-top30">
				<image :src="url+list.writeoff_qrcode" style="width: 200rpx;height: 200rpx;"></image>
			</view>
		</view>
		<view class="mar-top30 wid90 mar bacFFF borRad20" style="padding: 20rpx 0;">
			<view class="wid90 mar">
				<view class="dis disAl disJuB hei60">
					<view class="foSi20" style="color: #010101;opacity: 0.7;">提货点</view>
					<view class="foSi25">{{list.gasstation.name}}</view>
				</view>
				<view class="dis disAl disJuB hei60">
					<view class="foSi20" style="color: #010101;opacity: 0.7;">提货地址</view>
					<view class="dis disAl">
						<view class="foSi25 mar-right10">{{list.gasstation.address}}</view>
						<uni-icons type="location" size="25rpx"></uni-icons>
					</view>
				</view>
				<view class="dis disAl disJuB hei60">
					<view class="foSi20" style="color: #010101;opacity: 0.7;">联系电话</view>
					<view class="dis disAl">
						<view class="foSi25 mar-right10">{{list.gasstation.mobile}}</view>
						<uni-icons type="phone" size="25rpx"></uni-icons>
					</view>
				</view>
			</view>
			<view class="wid100 xia mar20"></view>
			<view class="wid90 mar">
				<view class="dis disAl disJuB hei60">
					<view class="foSi20" style="color: #010101;opacity: 0.7;">兑换商品</view>
					<view class="foSi25">{{list.goods.name}}</view>
				</view>
				<view class="dis disAl disJuB hei60">
					<view class="foSi20" style="color: #010101;opacity: 0.7;">数量</view>
					<view class="foSi25">{{list.num}}</view>
				</view>
				<view class="dis disAl disJuB hei60">
					<view class="foSi20" style="color: #010101;opacity: 0.7;">兑换时间</view>
					<view class="foSi25">{{list.createtime}}</view>
				</view>
			</view>
			<view v-if="list.writeoff_state == 1" class="wid100 xia mar20"></view>
			<view v-if="list.writeoff_state == 1" class="wid90 mar">
				<view class="dis disAl disJuB hei60">
					<view class="foSi20" style="color: #010101;opacity: 0.7;">核销门店</view>
					<view class="foSi25">{{list.gasstation.name}}</view>
				</view>
				<view class="dis disAl disJuB hei60">
					<view class="foSi20" style="color: #010101;opacity: 0.7;">核销人</view>
					<view class="foSi25">{{list.clerk.name}}</view>
				</view>
				<view class="dis disAl disJuB hei60">
					<view class="foSi20" style="color: #010101;opacity: 0.7;">核销时间</view>
					<view class="foSi25">{{list.writeofftime}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				url: this.global.url,
				list: ''
			}
		},
		onLoad(option) {
			this.getList(option.id)
		},
		methods: {
			getList(id) {
				var that = this;
				uni.request({
					url: that.global.url + '/api/qianyu_petrol/gasstation_integralorder_info',
					method: "POST",
					header: {
						'site-id': that.global.site_id, //自定义请求头信息
						'token': uni.getStorageSync('token')
					},
					data: {
						id: id
					},
					success(res) {
						let result = res.data
						console.log(result)
						if (result.code == 1) {
							that.list = result.data
						}
					}
				})
			},
		}
	}
</script>

<style>
	.content {
		background: #F8F9FD;
		height: 100vh;
	}
	.xia{
		height: 1rpx;
		background: #EEEEEE;
	}
</style>
